<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductPivotSpecValueTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('product_pivot_spec_value', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('product_id')->comment('商品ID');
			$table->integer('spec_value_id')->comment('商品规格值ID');
			$table->string('thumb')->nullable()->comment('对应缩略图片地址');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('product_pivot_spec_value');
	}

}
